<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#div{
				width: 50px;
				height: 50px;
				background-color: #42B983;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<button type="button" v-on:click="btn">点击</button>
			<div id="div" v-show="show">
				
			</div>
		</div>
		<script type="text/javascript">
		  let app=new Vue({
			  el:"#app",
			  data:{
				  show:true
			  },
			  methods:{
				  btn:function(){
					  // this.show=!this.show;
					  //亦可
					  app.show=!app.show;
				  }
			  }
		  })
		</script>
	</body>
</html>
